package com.himilco.ocana.gui.operator;

import com.himilco.ocana.gui.LazyTicketDataModel;
import com.himilco.ocana.workflow.core.dao.entities.Ticket;
import java.util.ArrayList;
import java.util.List;
import org.primefaces.model.LazyDataModel;

public class OperatorIterventionModel { 

    private String operatorChoice = "*";
    private List<Ticket> tickets = new ArrayList<Ticket>();
    private Ticket selectedTicket = new Ticket();
    private LazyDataModel<Ticket> lazyModel;
    private boolean changeMadeInDataTable;
    private int count;

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public void setChangeMadeInDataTable(boolean changeMadeInDataTable) {
        this.changeMadeInDataTable = changeMadeInDataTable;
    }
    
    public OperatorIterventionModel() {
        lazyModel = new LazyTicketDataModel(tickets);
    }

    public LazyDataModel<Ticket> getLazyModel() {
        lazyModel = new LazyTicketDataModel(tickets);
        System.out.println("number of tikcet added to lazy model " + getTickets().size());
        return lazyModel;
    }

    public void getRequestParameters() {
    }

    public Ticket getSelectedTicket() {
        return selectedTicket;
    }

    public void setSelectedTicket(Ticket selectedTicket) {
        this.selectedTicket = selectedTicket;
    }

    public void setTickets(List<Ticket> tickets) {
        this.tickets = tickets;
    }

    public String getOperatorChoice() {
        return operatorChoice;
    }

    public void setOperatorChoice(String operatorChoice) {
        this.operatorChoice = operatorChoice;
    }

    public List<Ticket> getTickets() {
        return tickets;
    }

 
}
